package com.gitee.xqlr.graphql.client.request.query;

import com.gitee.xqlr.graphql.client.request.GraphqlRequest;
import com.alibaba.fastjson.JSON;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 杜文康
 * @version 1.0
 * @date 2019/8/12 15:18
 */
public class GraphqlQuery extends GraphqlRequest {

    protected GraphqlQuery(String requestName) {
        super(requestName);
    }

    public String body() {
        Map<String, String> map = new HashMap<String, String>();
        map.put("query", toString());
        return JSON.toJSONString(map);
    }
}
